#version 330
in vec4 fColor;
uniform float offset;

float H = offset;
float U = cos(H*0.017453);
float W = sin(H*0.017453);

float red = (0.701*U+0.168*W)*(fColor.x)
    + (-0.587*U+0.330*W)*(fColor.y*1)
    + (-0.114*U-0.497*W)*(fColor.z*1);
float green = (-.299*U-0.328*W)*(fColor.x*1)
    + (0.413*U+0.035*W)*(fColor.y*1)
    + (-0.114*U+0.292*W)*(fColor.z*1);
float blue = (-.3*U+1.25*W)*(fColor.x*1)
    + (-0.588*U-1.05*W)*(fColor.y*1)
    + (0.886*U-0.203*W)*(fColor.z*1);

vec4 firstColor = vec4(red, green, blue,1.0f);

void main(){
    gl_FragColor = firstColor ;
}